import Vuex from 'vuex';
import Vue from 'vue';
import { APP } from '@/store/mutationsTypes';

Vue.use(Vuex);
export default {
  state: {
    isLoading: false,
  },
  mutations: {
    /* eslint注释请不要删除 */
    /* eslint-disable no-unused-expressions */
    [APP.UPDATE_LOADING](state, data) {
      state.isLoading = data;
    },
  },
  getters: {
    [APP.GET_LOADING](state) {
      /* loading */
      return state.isLoading;
    },
  },
};
